package com.trkj.pojo;

import java.io.Serializable;
import javax.persistence.*;

import com.alibaba.fastjson.annotation.JSONField;

import java.math.BigDecimal;
import java.sql.Timestamp;
import java.util.List;


/**
 * The persistent class for the AUXILIARY_INFORMATION database table.
 * 
 */
@Entity
@Table(name="AUXILIARY_INFORMATION")
@NamedQuery(name="AuxiliaryInformation.findAll", query="SELECT a FROM AuxiliaryInformation a")
public class AuxiliaryInformation implements Serializable {
	private static final long serialVersionUID = 1L;

	@Id
	@SequenceGenerator(name="AUXILIARY_INFORMATION_CODINGID_GENERATOR", sequenceName="HR")
	@GeneratedValue(strategy=GenerationType.SEQUENCE, generator="AUXILIARY_INFORMATION_CODINGID_GENERATOR")
	@Column(name="CODING_ID")
	private long codingId;

	@Column(name="CODING_BLOCKUP")
	private BigDecimal codingBlockup;

	@Column(name="CODING_FINAYLLY")
	private Timestamp codingFinaylly;

	@Column(name="CODING_NAME")
	private String codingName;

	@Column(name="CODING_PERSON")
	private String codingPerson;

	@Column(name="CODING_REMARK")
	private String codingRemark;

	@Column(name="CODING_UPDATE")
	private Timestamp codingUpdate;

	//bi-directional many-to-one association to Skill
	@ManyToOne
	@JoinColumn(name="SKILL_ID")
	private Skill skill;

	//bi-directional many-to-one association to ExamArrange
	@OneToMany(mappedBy="auxiliaryInformation")
	@JSONField(serialize=false)
	private List<ExamArrange> examArranges;

	public AuxiliaryInformation() {
	}

	public long getCodingId() {
		return this.codingId;
	}

	public void setCodingId(long codingId) {
		this.codingId = codingId;
	}

	public BigDecimal getCodingBlockup() {
		return this.codingBlockup;
	}

	public void setCodingBlockup(BigDecimal codingBlockup) {
		this.codingBlockup = codingBlockup;
	}

	public Timestamp getCodingFinaylly() {
		return this.codingFinaylly;
	}

	public void setCodingFinaylly(Timestamp codingFinaylly) {
		this.codingFinaylly = codingFinaylly;
	}

	public String getCodingName() {
		return this.codingName;
	}

	public void setCodingName(String codingName) {
		this.codingName = codingName;
	}

	public String getCodingPerson() {
		return this.codingPerson;
	}

	public void setCodingPerson(String codingPerson) {
		this.codingPerson = codingPerson;
	}

	public String getCodingRemark() {
		return this.codingRemark;
	}

	public void setCodingRemark(String codingRemark) {
		this.codingRemark = codingRemark;
	}

	public Timestamp getCodingUpdate() {
		return this.codingUpdate;
	}

	public void setCodingUpdate(Timestamp codingUpdate) {
		this.codingUpdate = codingUpdate;
	}

	public Skill getSkill() {
		return this.skill;
	}

	public void setSkill(Skill skill) {
		this.skill = skill;
	}

	public List<ExamArrange> getExamArranges() {
		return this.examArranges;
	}

	public void setExamArranges(List<ExamArrange> examArranges) {
		this.examArranges = examArranges;
	}

	public ExamArrange addExamArrange(ExamArrange examArrange) {
		getExamArranges().add(examArrange);
		examArrange.setAuxiliaryInformation(this);

		return examArrange;
	}

	public ExamArrange removeExamArrange(ExamArrange examArrange) {
		getExamArranges().remove(examArrange);
		examArrange.setAuxiliaryInformation(null);

		return examArrange;
	}

}